package com.youmu.maven.emall.dao;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.github.pagehelper.Page;
import com.youmu.maven.emall.entity.Permission;

@Repository
public interface PermissionDao extends BaseDao {
	public Page<Permission> getPermissionsByPage(Map<String, Object> parameters);

	@Deprecated
	public List<Permission> getPermissions(Map<String, Object> parameters);

	public void deletePermission(Map<String, Object> parameters);

	public Long insertPermission(Map<String, Object> parameters);

	public void updatePermission(Map<String, Object> parameters);

	public Set<Permission> getPermissionsByRoleId(@Param("id") Long id);

	public Set<Permission> getPermissionsByMenuId(@Param("id") Long id);
}
